<!DOCTYPE html>
<html class="x-admin-sm">
    <head>
        <meta charset="UTF-8">
        <title>新建咨询单</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
        <link rel="stylesheet" href="/static/css/font.css">
        <link rel="stylesheet" href="/static/css/xadmin.css">
		<link rel="stylesheet" href="/static/css/table.css">
        <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
        <script type="text/javascript" src="/static/js/xadmin.js"></script>
        <script type="text/javascript" src="/static/js/jquery.min.js"></script>
		<script type="text/javascript" src="/static/js/jquery.form.js"></script>
        <link rel="stylesheet" href="/static/css/updateimg.css">
        <!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
    </head>
    <body>
        <div class="x-nav">
          <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
            <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        </div>
        <div class="layui-fluid">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md12">
                    <form class="layui-form" id="signupForm" action="{:url('shop/consult/addconsult')}" method="post">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>咨询信息</li>
							  </ul>
							  <div class="layui-tab-content">
                                 <input type="hidden" name="shop_name" value="{$shopname}"/>
                                 <input type="hidden" name="clerk" value="{$Think.session.admin.nkname}"/>
								 <span>咨询门店：{$shopname}</span>
								 <span style="margin-left:30px;">营业员：{$Think.session.admin.nkname}</span>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>客户信息</li>
								<li><span class="span_border" style="cursor:pointer;" onclick="xadmin.open('咨询记录','./consulting-log.html',1000,600)">咨询记录</span></li>
							  </ul>
							  <div class="layui-tab-content">
								 <span>
									<label>客户姓名</label>
									 <div class="layui-input-inline">
										  <input type="text" id="username" name="username" class="layui-input" onchange="userAjax(this,1)">
									  </div>
							     </span>
								 <span style="margin-left:30px;">
									<label>客户称呼</label>
									 <div class="layui-input-inline">
										  <input type="text" id="nkname" name="nkname" class="layui-input" onchange="userAjax(this,2)">
									  </div>
							     </span>
								 <span style="margin-left:30px;">
									<label>联系方式</label>
									 <div class="layui-input-inline">
										  <input type="text" id="phone" name="phone" class="layui-input" onchange="userAjax(this,3)">
									  </div>
							     </span>
								 <span style="margin-left:30px;">
									<label>备用联系方式</label>
									 <div class="layui-input-inline">
										  <input type="text" id="spare_phone" name="spare_phone" class="layui-input" onchange="userAjax(this,4)">
                                          <input type="hidden" id="uid" name="uid"/>
									  </div>
							     </span>
							  </div>
							  <div class="layui-tab-content">
								<label>相似客户</label>
								<div class="layui-input-inline" id="userdata"></div>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>咨询产品</li>
								<li><span class="span_border" style="cursor:pointer;" onclick="xadmin.open('添加咨询产品','{:url('shop/consult/addconsgoods',['sn'=>$sn])}',1000,600)">添加咨询产品</span></li>
							  </ul>
							  <div class="layui-tab-content">
                                    <table class="layui-table layui-form" id="dataTables-example"></table>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>咨询产品照片</li>
							  </ul>
							  <div class="layui-tab-content">
                                <div id="showimg" style="display:flex;flex-direction:row;flex-wrap:wrap;align-items:center">
                                    <ul id="showui" style="padding-left:0!important">
                                    </ul>
                                    <div id="baseinput"></div>
                                    <div class="upimg" style="margin-left:20px">
                                       <input type="file" id="upgteimg" value="" multiple />
                                    </div> 
                                </div>
							  </div>
							</div>
							<div class="layui-tab layui-tab-card" style="margin-bottom:15px;">
							  <ul class="order_table">
								<li>咨询备注</li>
							  </ul>
							  <div class="layui-tab-content">
								 <textarea placeholder="请输入其他备注内容" name="remarks" class="layui-textarea"></textarea>
							  </div>
							</div>
                        </div>
                        <div class="layui-tab-content">
                            <div class="layui-form-item">
                                  <div id="hidden-content"></div>
                                  <button  class="layui-btn" lay-filter="add" lay-submit="">添 加</button>
                              </div>
                        </div>
                    </div>
                    </form>
                </div>
            </div>
        </div> 
        <script>
            var sn = "{$sn}";
        </script>
        <script type="text/javascript" src="/static/customized/shop/addconsult.js"></script>
    </body>
</html>